package com.fulihui.wgj.dal.impala.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 微信用户点击标识-统计uv
 *
 * @author wang_wx
 * @date 2018-08-09
 */
public interface WxUserMarkInfoMapper {

    /**
     * 统计UV
     *
     * @param startTime
     * @param endTime
     * @return
     */
    @Select("SELECT mark_link,count(distinct openid) AS uv FROM wx_user_mark_info WHERE gmt_create >= #{startTime} AND gmt_create <= #{endTime} GROUP BY mark_link")
    List<Map<String, Object>> countUv(@Param("startTime") Long startTime, @Param("endTime") Long endTime);
}
